package com.moioo.exam;

import java.util.HashSet;
import java.util.List;

import org.apache.struts.action.ActionForm;

public class TSurveyTm  extends ActionForm implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 8731851206770323119L;
	private Integer id;
	private Byte fill;
	private Integer maxask;
	private Integer minask;
	private String title;
	private Integer typeid;
	private String fillinfo;
	private List<TSurveyTmAsk> asks= null;
	private List<TSurveyTmItem> items= null;
	
	/* [CONSTRUCTOR MARKER BEGIN] */
	public TSurveyTm() {
		super();
	}

	public Byte getFill() {
		return this.fill;
	}

	public Integer getId() {
		return this.id;
	}

	public Integer getMaxask() {
		return this.maxask;
	}

	public Integer getMinask() {
		return this.minask;
	}

	public String getTitle() {
		return this.title;
	}

	public Integer getTypeid() {
		return this.typeid;
	}
	
	public String getFillinfo() {
		return this.fillinfo;
	}
	
	public List<TSurveyTmAsk> getAsks()
	{
		if (this.asks==null)
		{
			this.asks=TSurveyTmAsk.getDAO().findByTm(this.id);
		}
		return this.asks;
	}
	public List<TSurveyTmItem> getItems()
	{
		if (this.items==null)
		{
			this.items=TSurveyTmItem.getDAO().findByTm(this.id);
		}
		return this.items;
	}
	public Integer getItemLength()
	{
		if (this.items==null)
		{
			this.items=TSurveyTmItem.getDAO().findByTm(this.id);			
		}
		if (this.items==null)return 0;
		return this.items.size();
	}
	public void setFill(Byte fill) {
		this.fill=fill;
	}

	public void setId(Integer id) {
		this.id=id;
	}
	
	public void setFillinfo(String fillinfo) {
		this.fillinfo=fillinfo;
	}
	
	public void setMaxask(Integer maxask) {
		this.maxask=maxask;
	}

	public void setMinask(Integer minask) {
		this.minask=minask;
	}

	public void setTitle(String title) {
		this.title=title;
	}

	public void setTypeid(Integer typeid) {
		this.typeid=typeid;
	}

	public String toString() {
		return super.toString();
	}
	public static TSurveyTmDAO getDAO() {
		return new TSurveyTmDAO();
	}
	
	
	/* [CONSTRUCTOR MARKER END] */

}